<meta charset="UTF-8">
  <div class="content-wrapper">
    <section class="content-header">
      <h1 style="text-align:center">
        	生产计划
      </h1>
    </section>
    <section class="content" style='position: relative;'> 
         <div class="panel-body" style="padding-bottom:0px;">
						<div class="row searchdiv">
							<div class="form-group col-lg-2 col-xs-6 space" style='margin-left: 20px;width: 130px;padding-right: 0px;'>
								<div class="input-group date">
								  <input type="text" class="form-control pull-right" id="datepicker" >
								</div>
							</div>
							<div style='display: inline-block;width: 20px;height: 34px;line-height:34px;text-align: center;float: left;'>-</div>
							<div class="form-group col-lg-2 col-xs-6 space" style='width: 130px;padding-left: 0px;'>
								<div class="input-group date">
								  <input type="text" class="form-control pull-right" id="datepicker2" >
								</div>
							</div>	
							
							<div class="form-group col-lg-2 col-xs-6 space" style='width: 130px;'>
                    <button type="submit" class="btn btn-default" style='padding: 6px 12px;' ng-click='search()'>
                    	<i class="fa fa-search"> 查询</i>
                    </button>
                </div>
			     			 <button style='margin-right: 3%; padding: 7px 12px;' class="btn pull-right" ng-click="download('operationTableExport','生产计划')"><i class="fa fa-cloud-download"></i>&nbsp;&nbsp;导出</button>
			   				 <button style='margin: 0px 1%;padding: 7px 6px;background-color: #3c8dbc;font-size: 14px;width: 20%;max-width: 50px;' class="btn pull-right" ng-click="jump('/productionAdd')">新增</button><!--data-toggle="modal" data-target="#addCategory"-->
						</div>
			   
			<!--表格-->
			<div class="box" >
            <div class="box-body">
            		<div class="col-md-12">
					          <div class="nav-tabs-custom">
					            <ul class="nav nav-tabs">
					              <li class="active"><a href="javascript:void(0)" data-toggle="tab" aria-expanded="false" ng-click="goTab('1')">已通过</a></li>
					              <li class=""><a href="javascript:void(0)" data-toggle="tab" aria-expanded="false" ng-click="goTab('2')">待处理</a></li>
					              <!--<li class=""><a href="javascript:void(0)" data-toggle="tab" aria-expanded="true" ng-click="goTab('3')">已作废</a></li>-->
					            </ul>
					            <div class="tab-content" style='padding: 0px;'>
					              <div class="tab-pane active" id="tab_1" ><!--ng-show="tabPage == '1'"-->
					              		<table id='productionTable' style='margin-bottom: 10px;width: 100%; position: relative;overflow: auto;height:450px; display: block;background: #ffffff;'  class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
						                <thead style='display: inline-table;width: 100%;'>
							                <tr role="row">
							                	<th    style="width: 10%;" >食堂名称</th>
							                	<th  style="width: 20%;">计划单号</th>
							                	<th   style="width: 10%;">计划日期</th>
							                	<th  style="width: 10%;">餐别</th>
							                	<th   style="width: 10%;">设置人</th>
							                	<th  style="width: 13%;">设置时间</th>
							                	<th  style="width: 7%;">状态</th>
							                	<th  style="width: 10%;">操作</th>
							                </tr> 
						                </thead>
						              <tbody style='display: inline-table;width: 100%;'>
								                <tr role="row"  ng-class="{even:!$even, odd:!$odd}" ng-repeat="opt in items"><!--class="flow" style='position: relative;width: 100%;display: flex;'-->
									                  <td style="width: 10%;word-break: break-all;">{{opt.canteen_name}}</td>
									                  <td style="width: 20%;word-break: break-all;" >{{opt.plan_id}}</td>
									                  <td style="width: 10%;word-break: break-all;">{{opt.selected_date}}</td>
									                  <td style="width: 10%;word-break: break-all;">{{opt.period_time_name}}</td>
													  				<td style="width: 10%;word-break: break-all;" >{{opt.create_by}}</td>
													  				<td style="width: 13%;word-break: break-all;" >{{opt.create_time}}</td>
													  				<td style="width: 7%;word-break: break-all;" >{{opt.status == '0' ? '待处理' :'已通过'}}</td>
													  				<td style="width: 10%;" ng-show='tabPage == 1'>
													  					<span class='fun' ng-click="jump('/productionLook/{{opt.plan_id}}')">查看</span>
													  				<!--	<span class='fun'>驳回</span>-->
													  					<span class='fun' ng-click='delProduction(opt.plan_id,opt.selected_date,opt.period_time_name)' >删除</span>
													  				</td>
													  				<td style="width: 10%;" ng-show='tabPage == 2'>
													  					<span class='fun' ng-click="jump('/productionApproval/{{opt.plan_id}}')">审/看</span>
													  					<span class='fun' ng-click="jump('/productionUpdate/{{opt.plan_id}}')" >修改</span>
													  				</td>
													  				<!--<td style="width: 10%;" ng-show='tabPage == 3'>
													  					<span class='fun' ng-click="jump('/productionLook')">查看</span>
													  					<span class='fun'>恢复</span>
													  				</td>-->
								                </tr>
						                </tbody>
						                <tfoot>
						                </tfoot>
					              </table> 
					              </div> 
					              <!--<div class="tab-pane active" id="tab_2" ng-show="tabPage == '2'">
					              </div>
					              <div class="tab-pane active" id="tab_3" ng-show="tabPage == '3'">
					              </div>-->
					            </div>
						            <div class="row" style="margin-bottom:10px;padding-left: 15px;padding-bottom: 10px;">
						              	<div class="col-sm-3">
						              		<div style='padding-top: 5px;' class="dataTables_info" id="example1_info" role="status" aria-live="polite">总条目数：{{totalNums}}</div>
						              	</div>
							                <div class="col-sm-9">
							                	<div class="dataTables_paginate paging_simple_numbers row" id="example1_paginate">
							                		<label style="font-weight:normal;float:left;padding-right:15px;width: 220px;">
							                			<span>每页显示数目 </span>
							                			<select style='width: 100px;display: inline-block;' name="example1_length" aria-controls="example1" class="form-control input-sm" ng-change="change(initial)" ng-model="initial" > 
							                				<option value="10">10</option> 
							                				<option value="25">25</option>
							                				<option value="50">50</option>
							                				<option value="100">100</option>
							                			</select>
							                		</label>
							                		<ul class="pagination col-lg-7" style='cursor: pointer;'>
							                			<li class="paginate_button previous " id="example1_previous" >
							                				<a  ng-click="Previous()">上一页</a>
							                			</li>
							                			<li   ng-repeat="page in pageList" ng-class="{active: isActivePage(page)}">
							                				<a  ng-click="selectPage(page)">{{page}}</a>
							                			</li>
							                			<li class="paginate_button next" id="example1_next">
							                				<a  ng-click="Next()">下一页</a>
							                			</li>
							                		</ul>
							                	</div>
							                </div>
							              </div>
						              
						          </div>
        				</div>
            </div>
      </div>
	</section>
</div>
<!-- 删除生产计划 -->
  	<div class="modal fade" id="delPlan" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body">
           	确定要删除&nbsp;&nbsp;<span ng-bind="plan_date"></span>&nbsp;&nbsp;--&nbsp;&nbsp;<span ng-bind="plan_name"></span>&nbsp;&nbsp;吗？
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="del_plan(plan_id);">确定</button>
      </div>
    </div>
  </div>
</div>

<style>
	.space{
		padding-left:2px;
		padding-right:2px;
	}
	.box{
		border-top:1px solid #d2d6de;
	}
	.pagination{
		margin:0;
	}
	.odd{background-color: #f9f9f9 !important;}
	.even{background-color: transparent !important;}
	.btn{    padding: 10px 12px;}
	.flow td{overflow: hidden; text-overflow:ellipsis; white-space: nowrap;}
	.fun:hover{cursor: pointer;color: #00E765;}
	/*.flow td:hover{text-overflow:inherit;overflow:visible;z-index: 1000;background-color: rgba(255,255,255,0.9);}*/
</style>
 <script>
	
</script>